{% extends "panel/panel_base.html" %}
{% load thumb %}
{% block extra_head %}
<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.js"></script>
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript">
$(function() {
	$('a.lightbox').lightBox(); // Select all links with lightbox class
});
</script>
{% endblock %}
{% block panel_title%}{{user.first_name}}'s Photo Gallery:{% endblock %}
{% block panel_content %}

	{% for g in ugallery %}
	
		<span class="gallery_title"><a href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{g.title|slugify}}/">
			{{g.title|upper}}</a>{% if own %} | <a href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{g.id}}/edit/">Edit</a> | <a href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{g.id}}/add/image/">Add Images</a>{% endif %}:</span> <br />
		<small><strong>Date Added:</strong> {{g.date_added|date}}</small><br />
		<small><strong>Description:</strong> <br />{{g.description}}</small><br />
		{{g.list}}
		<div id="image_div">
			{% for i in g.ret_thumb %}
				<a href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{g.slug}}/{{i.slug}}/"><img class="preview" alt="{{i.title}}" src="{{i.image|thumbnail:"150x150"}}" /></a>
			{% endfor %}
			<a href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{g.title|slugify}}/"><img src="{{MEDIA_URL}}images/gallery_cont.png" style="border:none" /></a>
		</div>
		<br >
	{% empty %}
	{% if own %}
	You don't currently have any image galleries.<br />
	
	{% else %}
	This user does not currently have any galleries.
	{% endif %}
	{% endfor %}
	{% if own %}
	<a class="def_link" href="http://fblaconnection.com/panel/{{user.username}}/gallery/new/gallery/">Create A New Gallery</a>
	{% endif %}
{% endblock %}